/**
 * 负责管理与数据库的通信
 */
import { GaDbConnection } from './GaDbConnection'
import { GaBaseBean } from "./GaBaseBean"
import { Context } from '@kit.AbilityKit'

export { GaBaseBean }


/**
 *
 */
export class GaDbManager {
  conn?: GaDbConnection

  async createConnection(dbName: string) {
    let conn = new GaDbConnection();
    await conn.connect(dbName);
    this.conn = conn;
  }

  getConnection(): GaDbConnection {
    return this.conn;
  }

  static initClass(context: Context) {
    GaDbConnection.initClass(context);
  }
}